﻿@model ejunkey.Models.ProductListViewModel
@{
    ViewBag.Title = "EDIT PRODUCT LISTING";
}
<script type= "text/javascript">

//    $(document).ready(function () {
//        $("#ddl").change(function () {
//            var strSelected = "";
//            $("#ddl option:selected").each(function () {
//                strSelected += $(this)[0].value;
//            });
//            $("#productid").attr("href", location + '/' + strSelected);
//        });
//    });
    $(document).ready(function () {
        $("#btnEdit").click(function () {
            var strSelected = "";
            $("#ddl option:selected").each(function () {
                strSelected += $(this)[0].value;
            });
            parent.location = location + '/../ProductConfiguration/' + strSelected;
        });
    });

    $(document).ready(function () {
        $("#btnDelete").click(function () {
            var strSelected = "";
            $("#ddl option:selected").each(function () {
                strSelected += $(this)[0].value;
            });
            parent.location = location + '/../DeleteProduct/' + strSelected;
        });
    });

    $(document).ready(function () {
        $("#btnMarketPlace").click(function () {
            var strSelected = "";
            $("#ddl option:selected").each(function () {
                strSelected += $(this)[0].value;
            });
            parent.location = location + '/../RequiredInformation/' + strSelected;
        });
    });  
</script>

<h2>SELECT PRODUCT</h2>
   
<div>
    <div>
            @Html.Hidden("ClientID")
            @Html.DropDownList("ddl", Model.Products)
    </div>
    <div>
        <input type="submit" value="BACK" onclick="parent.location='@Url.Action("Index", "Seller")'"/>
        <input id="btnEdit" type="submit" value="EDIT"/>
        <input type="submit" value="GET BUTTON CODE" onclick="parent.location='@Url.Action("GenerateButton")'" />
        <input id="btnDelete" type="submit" value="DELETE"/>
    </div>
</div>
<br />
<br />
<br />
<div>
<input id="btnMarketPlace" type="submit" value="ADD/EDIT LISTING IN YOUR E-JUNKEY SHOP AND OUR MARKETPLACE"/>
</div>
<br />
<br />
<br />
<div>
<input type="submit" value="EDIT AFFILIATES SETTINGS" disabled="disabled" onclick="parent.location='@Url.Action("NOACTION")'"/>
</div>